package com.sakuracard.stepdemo.model;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class AFieldEntity {
  @SerializedName("getKeyWords")
  private List<KeyWordItem> getKeyWords;
  private String logic;
  @SerializedName("totalHeader")
  private List<String> totalHeader;

  @Data
  public static class KeyWordItem {
    @SerializedName("default")
    private Object defaultValue;
    private String name;
    private String title;
    private boolean required;
    private String type;
    private Object value;

    public KeyWordItem() {
      this.type = "text";
      this.defaultValue = "";
    }

    public KeyWordItem(String name, String title) {
      this();
      this.name = name;
      this.title = title;
    }
  }
}
